package com.sym.demo.factory.simple;

/**
 * @Author: su_yongming
 * @Date: 2021/3/17 10:11
 */
public class SimpleFactory {
    public Car getCar(String carType) {
        if(carType.equals("benz")) {
            return new BenzFactory();
        }

        if(carType.equals("Bmw")) {
            return new BmwFactory();
        }

        return null;
    }
}
